<div tabindex="-1" (keydown)="onKeyup($event)" class="disk-container">
    <div *ngIf="!isLoading;else elseLoadingTemplate">
        <ul class="disks" *ngIf="disks && disks.length > 0;else elseNoDiskTemplate">
          <div *ngFor="let disk of disks; let i=index" id="_logic_disk_{{i}}" [tabindex]="i" class="disk" 
          [class.focus]="disk===currentFocusDisk" (focus)="onDiskFocus(disk)" (dblclick)="openDisk(disk)">
            <div class='icon' *ngIf="disk.fileSystem === 'CDFS' || disk.fileSystem === 'UDF'; else elseIconTemplate">
              <img src="./assets/files/cd-drive.png" width="48">
            </div>
            <ng-template #elseIconTemplate>
                <div class='icon'>
                  <img src = "./assets/files/disk.png" width="48">
                </div>
            </ng-template>
            <div class="detail">
              <div *ngIf="disk.fileSystem==='NTFS' || disk.fileSystem==='FAT32'; else elseBDROMTemplate">
                <div class="name">本地磁盘({{disk.name}})</div>
                <div class="progress progressCustom">
                  <div class="progress-bar progressBarCustom" role="progressbar" aria-valuemin="0" aria-valuemax="100" [ngStyle]="disk.percentageStyle">
                    <!-- {{disk.percentage}}% -->
                  </div>
                </div>
                <div class="diskinfo">
                  {{disk.freeSpaceDetails}} 可用，共 {{disk.sizeDetails}}
                </div>
              </div>
              <ng-template #elseBDROMTemplate>
                  <div class="name">BD-ROM驱动器({{disk.name}})</div>
                  <div>
                    {{disk.volumeName}}
                  </div>
                  <div>
                    {{disk.freeSpaceDetails}} 可用，共 {{disk.sizeDetails}}
                  </div>
                </ng-template>
            </div>
          </div>
        </ul>
        <ng-template #elseNoDiskTemplate>
            <div style="padding:10px">没有找到磁盘数据</div>
        </ng-template>
      </div>
      <ng-template #elseLoadingTemplate>
          <div style="width:100%;height: 60%; display:flex;justify-content:center;align-items:center;">
            <div class="loadingImage">&nbsp;</div>
          </div>
      </ng-template>
</div>